// pages/me/me.js
Page({
  data: {
    userInfo: {},
    openid: "",
    list: [{
        "icon": "/image/document.png",
        "title": "资源"
      },
      {
        "icon": "/image/history.png",
        "title": "历史记录"
      },
      {
        "icon": "/image/love.png",
        "title": "收藏"
      },
      {
        "icon": "/image/guanzhu.png",
        "title": "关注"
      }
    ]
  },
  handle:function(event){
    const index=event.currentTarget.dataset.index
    if(index==1){
      wx.navigateTo({
        url: 'list/list'
      })
    }else{
      wx.showToast({
        title: '暂无记录',
      })
    }
    
    
  },
  onLoad: function() {
    this.setData({
      userInfo: wx.getStorageSync('userInfo'),
      openid: wx.getStorageSync('userInfo').openid
    })
  },
  onShow: function() {
    //this.callMeController()
    this.setData({
      userInfo: wx.getStorageSync('userInfo'),
      openid: wx.getStorageSync('userInfo').openid
    })
  },
  toMessage: function() {
    wx.navigateTo({
      url: 'message/message',
    })
  }

})